package com.yxp.offer;

/**
 * @author      : yang.xp
 * @date        : 2021/8/20 9:53
 * @description : 剑指 Offer 10- II. 青蛙跳台阶问题
 */
public class Problem10_2 {
    public static void main(String[] args) {

    }

    public int numWays(int n) {
        int a = 1, b = 1, sum;
        for (int i = 0; i < n; i++) {
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }
        return a;
    }
}
